﻿@{
    ViewBag.Title = "ListViewDemo";
    
}

<h2>ListViewDemo</h2>


<div id="listView">
    <div id="toolbar" class="ui-widget-header ui-corner-all">
        Page <span class="currentPage">0</span> / <span class="totalPages">0</span>
    </div>
    <ul class="entries"></ul>
</div>

@section scripts {
    
    @CoffeeScripts.Render("~/CoffeeScripts/shared/coffee")
    @CoffeeScripts.Render("~/CoffeeScripts/models/coffee")
    @CoffeeScripts.Render("~/CoffeeScripts/controllers/base/coffee")
    @CoffeeScripts.Render("~/CoffeeScripts/controllers/coffee")
    @Scripts.Render("~/Scripts/coffee-script.js", "~/bundles/waypoint")
    <style>
        div.entryItem
        {
            height: 40px;
        }

        div.entryItem span.label
        {
            font-weight: normal;
        }

        div.entryItem
        {
            padding: 5px;
        }

            div.entryItem img
            {
                height: 40px;
                width: 40px;
                vertical-align: text-top;
            }

    </style>

    <script type="text/x-jquery-tmpl" id="entryTemplate">
        <div class="entryItem" title="${metadata.text}">
            <img class="ul-li-icon" src="${links.typeInfo.url}?rel=largeIcon" />
            <span class="label">
                <a href="#" rel="external" class="changePath">${label}</a>
            </span>
        </div>
    </script>
    <script type="text/x-jquery-tmpl" id="entryItemTemplate1">
    </script>

    <script type="text/coffeescript">
_elist1page1path = "/api/parse"
$(document).ready(() ->
  $(document).tooltip({
    content: () ->
        return $(this).attr('title')
    })
  
  $( "button.prevPage" ).button({
    icons: { primary: "	ui-icon-triangle-1-w" },
    text: false
  })
  $( "button.nextPage" ).button({
    icons: { primary: "	ui-icon-triangle-1-e" },
    text: false
  })

  listView = new Cofe.EntryListView({ el : $("#listView"), waypoint : true, select : 'multi' })      
  listView.changePath(Cofe.utils.formatPath("{cofe}", { rel : "list" }, 20, 1))
  
 
  
)
    </script>

    <script type="text/coffeescript">

    </script>
}
